import { FORMAT, Inject } from '@midwayjs/core';
import { IJob, Job } from '@midwayjs/cron';
import { TaskRecordService } from '../service/record';

@Job({
  cronTime: FORMAT.CRONTAB.EVERY_MINUTE,
  start: true,
})
export class TaskStatusCheckerJob implements IJob {
  @Inject()
  taskRecordService: TaskRecordService;

  async onTick() {
    this.taskRecordService.overtimeStatus();
  }
}
